import type { RouteMeta } from 'vue-router';
export interface RouteItem {
  path: string;
  component: any;
  meta: RouteMeta;
  name?: string;
  alias?: string | string[];
  redirect?: string;
  caseSensitive?: boolean;
  children?: RouteItem[];
}

export interface MenuTree extends ItemMenu {
  children?: ItemMenu;
}

export interface CreateMenu {
  icon: string;
  title: string;
  type: number;
  viewPath?: string;
  isShow?: boolean;
  keepalive?: boolean;
  router?: string;
  nodes?: string[];
  parentId?: number | null;
  sort?: number;
}

export interface ItemMenu extends CreateMenu {
  id: number | null;
  name?: string;
}

export interface UpdateMenu extends Partial<CreateMenu> {
  id: number;
}

/**
 * @description: Get menu return value
 */
export type getMenuListResultModel = RouteItem[];
